import React from 'react';
import { connect } from 'dva';
import styles from './Layouts.css';
import {Layout} from 'antd';
import NavBar from '../components/NavBar';
import {Route,Switch,Redirect} from 'dva/router';
import {renderRoutes} from '../utils/route';
let {Content} = Layout;
function Layouts(props) {
  return (
    <Layout>
      <NavBar {...props}/>
      <Content>
        <Switch>
         {renderRoutes(props.children,props.app)}
        </Switch>
      </Content>
    </Layout>
  );
}


export default connect()(Layouts);
